Author: Ekaterina Butenko
Posted: 12/26/2007 3:18:38 PM
Problem: When PNG images are used in Sitecore with Internet Explorer 6.0, an issue with transparency of the picture may appear.
Answer: This is a known issue with transparency in IE6 for PNG-24 images, see the following link:
http://support.microsoft.com/kb/294714
When using PNG-8 (not PNG-24) format, the transparency should work fine.
But after uploading to Sitecore and using ashx, the PNG-8 images are treated as PNG-24 images. It is not a Sitecore issue, it depends on the property System.Drawing.Imaging.ImageFormat.Png.
More details:
- When you upload and save the PNG-8 image, Sitecore's function Sitecore.Resources.Media.MediaConfig.GetImageFormat returns the System format of the image - System.Drawing.Imaging.ImageFormat.Png:
More information about System.Drawing.Imaging.ImageFormat.Png can be found at the following link:
http://msdn2.microsoft.com/en-us/library/system.drawing.imaging.imageformat.png.html
- The System class gets the W3C Portable Network Graphics (PNG) image format
W3C Portable Network Graphics format:
http://www.w3.org/Graphics/PNG/
Second edition:
- Corresponding to the second edition the image’s format is transformed to PNG-24.
Note: IE7 does not have this issue.
The three recommended workarounds are listed here:
- Upgrade to IE7.
- Upload images as files and then use the file path of media (in order not to work with ashx).
- A Workaround using the AlphaImageLoader class is described at the following link:
Prev Next